﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BingVis.SilverlightClient.GoogleTransit
{
    public static class StopsWithFares
    {
        public static bool IsFareStop(string stop)
        {
            // TODO: Fix a bug for Kendall/Mit station not showing as farestop.
            var snl = StopNameLookup.GetStopName(stop);
            
            return fareStops.Contains(snl) || convertedStops.Contains(snl);
        }

        private static string[] fareStops = new string[]
        {
            "newton centre",
            "reservoir",
            "woodland",
            "chestnut hills",
            "beaconsfield",
            "fenway",
            "waban",
            "brookline village",
            "longwood",
            "brookline hills",
            "newton highlands",
            "riverside",
            "kendall square",
            "mass ave",
            "roxbury crossing",
            "wollaston",
            "south station",
            "jfk/u mass",
            "ashmont",
            "haymarket",
            "wood island",
            "broadway",
            "arlington",
            "back bay",
            "green street",
            "maverick",
            "braintree",
            "central square",
            "aquarium",
            "forest hills",
            "quincy adams",
            "savin hill",
            "malden center",
            "downtown crossing",
            "wonderland",
            "symphony",
            "charles mgh",
            "world trade center",
            "park street",
            "science park",
            "hynes",
            "revere beach",
            "andrew square",
            "copley square",
            "shawmut",
            "suffolk downs",
            "bowdoin",
            "wellington",
            "ruggles",
            "porter square",
            "chinatown",
            "boylston",
            "state street",
            "courthouse",
            "north station",
            "davis square",
            "lechmere",
            "n.e.medical center",
            "alewife",
            "kenmore square",
            "community college",
            "oak grove",
            "orient heights",
            "north quincy",
            "sullivan square",
            "quincy center",
            "prudential",
            "fields corner",
            "stony brook",
            "jackson square",
            "harvard",
            "airport",
            "goverment center",
            "heath",
            "coolidge",
            "north eastern",
            "brigham",
            "cleveland circle",
            "st. mary's",
            "beachmont",
        };

        private static string[] convertedStops = fareStops
                                                  .Where(s => FareStopLookup.GetStopName(s) != s)
                                                  .Select(s => FareStopLookup.GetStopName(s))
                                                  .ToArray();
    }
}
